package com.huynhchihieu.dao;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;

import com.huynhchihieu.domain.Person;

@Repository
public class PersonDAOImpl implements PersonDAO{

	@PersistenceContext(unitName="persistenceUnit")
	EntityManager entityManager; 
	

	public void insertPerson(Person person) {
		entityManager.persist(person);
	}

	public EntityManager getEntityManager() {
		return entityManager;
	}

	public void setEntityManager(EntityManager entityManager) {
		this.entityManager = entityManager;
	}

	

}
